package com.wanglei.ssm.dao;

import com.wanglei.ssm.domain.Traveller;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 旅客数据操作接口
 *
 * @author wl
 */
public interface TravellersDao {

    /**
     * 根据订单id查询旅客信息集合
     *
     * @param ordersId 订单id
     * @return 旅客信息集合
     * @throws Exception e
     */
    @Select("select * from traveller where id in (select travellerId from order_traveller where orderId = #{ordersId})")
    List<Traveller> findByOrdersId(String ordersId) throws Exception;
}
